package cn.dakaqi.utils.exception;

import cn.dakaqi.utils.ErrorCodeMsg;

/**
 * Created by chunyang on 2016/3/21.
 */
public class ServiceRuntimeException extends RuntimeException
{
    private static final long serialVersionUID = 3583566093089790852L;

    private ErrorCodeMsg errorCodeMsg = null;

    public ServiceRuntimeException() {
        super();
    }

    public ServiceRuntimeException(String message) {
        super(message);
    }

    public ServiceRuntimeException(ErrorCodeMsg errorCodeMsg) {
        super(errorCodeMsg.getMsg());
        this.errorCodeMsg = errorCodeMsg;
    }

    public ErrorCodeMsg getErrorCodeMsg()
    {
        return errorCodeMsg;
    }

    public ServiceRuntimeException(Throwable cause) {
        super(cause);
    }

    public ServiceRuntimeException(String message, Throwable cause) {
        super(message, cause);
    }
}
